

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<script type="text/javascript">
	$(document).ready(function() {
		$('table.tablesorter').tablesorter({
			widgets : [ 'zebra' ],
			sortList : [ [ 0, 0 ] ],
			headers : {				
				5 : {
					sorter : false
				}
			}
		});

		$('.edit-partner-link').click(function() {
			loadDiv('content', 'showAddPartner.do?id=' + $(this).attr('partnerId'));
		});
	});
</script>

<div id="partnerListDiv" class="hastable">
	<table class="tablesorter">
		<thead>
			<tr>
				<th><spring:message code="partnerlist.table.heading.name" /></th>
				<th><spring:message code="partnerlist.table.heading.address1" /></th>
				<th><spring:message code="partnerlist.table.heading.city" /></th>
				<th><spring:message code="partnerlist.table.heading.state" /></th>
				<th><spring:message code="partnerlist.table.heading.url" /></th>
				<th><spring:message code="partnerlist.table.heading.edit" /></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${partners}" var="partner">
				<tr>
					<td>${partner.partnerName}</td>
					<td>${partner.address1}</td>
					<td>${partner.city}</td>
					<td>${partner.state}</td>
					<td><a href="${partner.url}" target="_blank">${partner.url}</a></td>
					<td><a href="javascript://" class="edit-partner-link"
						partnerId="${partner.id}"><spring:message
								code="partnerlist.table.link.edit" /></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div id="partnerListPager"></div>
</div>


